import axios from "axios";

class HttpServer {
	get(url: string) {
		axios.get(url);
	}
	post(url: string, prame: object) {
		axios.post(url, prame);
	}
}

const aa = function<T>(value: T): Promise<T> {
	return new Promise((resolve, reject) => {
		resolve(value);
	});
};

aa<string>("qwe").then(result => console.log(`异步的数值${result},成功走这里`));

class abc<T> {
	public value: T;
	constructor(value: T) {
		this.value = value;
	}

	post(value: T) {
		return value;
	}
}

function func<T>(value: T): T {
	return value;
}

func<number>(123);

const a1 = new abc<number>(123);

// const promise = function() {
//     return	new Promise(resolve, reject);
// };

// function resolve(value?: any): void {}

// function reject(value?: any): void {}

export default HttpServer;
